"""
Go rules module.
"""

from pygo1963.model.Move import Move
from pygo1963.model.Constants import EMPTY
from pygo1963.model.Vertex import Vertex

class GoRules:
    """
    Atari Go Rules Class. Provides methods for move generation.
    """
    
    def generate_valid_moves(self, board, colour):
        """
        Generates all empty squares on the board. It does not make game validation.
        """
        
        return [Move(colour, Vertex(x, y)) for x in range(board.size) for y in range(board.size) 
                if board.content[x][y] == EMPTY]